package Tree;

public class N叉树的最大深度 {
    public int maxDepth(TreeNode root) {
        if (root == null) return 0;
        int depth = 0;
        for (TreeNode child : root.children) depth = Math.max(depth, maxDepth(child));
        return depth + 1;
    }
}
